package com.jms;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
import org.springframework.jms.config.JmsListenerContainerFactory;
import org.springframework.jms.support.converter.MappingJackson2MessageConverter;
import org.springframework.jms.support.converter.MessageConverter;
import org.springframework.jms.support.converter.MessageType;


@Configuration
public class Configurations {

  public static final String MESSAGE_QUEUE = "message-queue";

//  @Bean
//  public JmsListenerContainerFactory<?> queueListenerFactory() {
//    DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
//    factory.setMessageConverter(messageConverter());
//    return factory;
//  }
//
//  @Bean
//  public MessageConverter messageConverter() {
//    MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
//    converter.setTargetType(MessageType.TEXT);
//    converter.setTypeIdPropertyName("_type");
//    return converter;
//  }
}
